<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<!--MP4  ogg webM-->
<video id="vi" src="飙车视频.mp4" controls = "controls" height="400px" width="600px"
       poster="1.png" ></video>
<!--autoplay  loop  src controls  poster(海报) muted ended paused volume
duration 时间-->

<button onclick="fn()">全屏</button>
</body>
</html>
<script>
    function fn(){

        var v = document.getElementById('vi');
        alert(v.duration);
        //全屏
        //v.webkitRequestFullScreen();

       // v.requestFullScreen();
        //退出全屏
        //document.webkitCancelFullScreen()
    }
</script>